import UnitCommon from 'code/Core/Common/UnitCommon';
import TalentBase from 'code/Scripts/Abilities/base/TalentBase';
const desc = `你的攻击有机率立刻发动身上的一个技能`;
const art = 'ReplaceableTextures\\CommandButtons\\BTNImprovedBows.blp';
const name = '月玄箭';
const config: TalentConfigModel = {
    id: 'talent_t_TalentMonnShoot',
    name,
    desc,
    art,
    buffType: {
        id: 'buff_t_TalentMonnShoot',
        art,
        name,
        ubertip: desc,
    },
    buffTypePlus: {
        id: 'buff_t_TalentMonnShoot_plus',
        art,
        name: '月玄箭[觉醒]',
        ubertip: '你的攻击有机率立刻发动身上的一个技能',
    },
};
export default class TalentMonnShoot extends TalentBase {
    static instance: TalentMonnShoot;
    constructor(p?: TalentConfigModel) {
        super(p);
        TalentMonnShoot.instance = this;
        this.setTalentConfig(config);
        EventManager.onTakeAttack(this.attackEffect.bind(this));
    }
    attackEffect(d: DamageEventData) {
        let { plus, unEffect } = this.talentUnEffect(d.source);
        if (unEffect) return;
        UnitCommon.普攻冷却(d.source);
    }
}
